import React from 'react';
import { IFormItem, Itype } from '@/base-ui/form';
import { ISearchSelector, IToolButton } from '@/base-ui/tool-bar';

/* 搜索区域 */
export const PageSearchConfig: IFormItem[] = [
  {
    type: 'input' as Itype,
    label: '仓库id',
    placeholder: '请输入仓库id'
  },
  {
    type: 'input' as Itype,
    label: '用户id',
    placeholder: '请输入用户id'
  },
  {
    type: 'input' as Itype,
    label: '生产批号',
    placeholder: '请输入生产批号'
  },
  {
    type: 'input' as Itype,
    label: '产品名称',
    placeholder: '请输入产品名称'
  },
  {
    type: 'input' as Itype,
    label: '材料名称',
    placeholder: '请输入材料名称'
  },
  {
    type: 'input' as Itype,
    label: '供应商',
    placeholder: '请输入供应商'
  },
  {
    type: 'select' as Itype,
    label: '订单',
    placeholder: '请选择状态',
    options: [
      { label: '未付款', value: 'value1' },
      { label: '已付款', value: 'value2' },
      { label: '退款中', value: 'value3' },
      { label: '已退款', value: 'value4' }
    ]
  },
  {
    type: 'select' as Itype,
    label: '件数',
    placeholder: '请选择件数区间',
    options: [
      { label: '1000件以下', value: 'value1' },
      { label: '1000-5000件', value: 'value2' },
      { label: '5000-20000件', value: 'value3' },
      { label: '20000件以上', value: 'value4' }
    ]
  },
  {
    type: 'select' as Itype,
    label: '只数',
    placeholder: '请选择只数区间',
    options: [
      { label: '1000只以下', value: 'value1' },
      { label: '1000-5000只', value: 'value2' },
      { label: '5000-20000只', value: 'value3' },
      { label: '20000只以上', value: 'value4' }
    ]
  },
  {
    type: 'select' as Itype,
    label: '重量',
    placeholder: '请选择重量区间',
    options: [
      { label: '100kg以下', value: 'value1' },
      { label: '100kg-500kg', value: 'value2' },
      { label: '500kg-1000kg', value: 'value3' },
      { label: '1000kg以上', value: 'value4' }
    ]
  },
  {
    type: 'select' as Itype,
    label: '规格',
    placeholder: '请选择规格区间',
    options: [
      { label: '100kg以下', value: 'value1' },
      { label: '100kg-500kg', value: 'value2' },
      { label: '500kg-1000kg', value: 'value3' },
      { label: '1000kg以上', value: 'value4' }
    ]
  },
  {
    type: 'select' as Itype,
    label: '单价',
    placeholder: '请选择单价区间',
    options: [
      { label: '1000-5000元', value: 'value1' },
      { label: '5000-20000元', value: 'value2' },
      { label: '20000元-50000元', value: 'value3' },
      { label: '50000以上', value: 'value4' }
    ]
  },
  {
    type: 'input' as Itype,
    label: '收货商',
    placeholder: '请输入收货商'
  },
  {
    type: 'input' as Itype,
    label: '单位',
    placeholder: '请输入单位'
  },
  {
    type: 'input' as Itype,
    label: '备注',
    placeholder: '请输入备注'
  }
  // {
  //   type: 'password' as Itype,
  //   label: '密码',
  //   placeholder: '请输入密码'
  // },S
];

/* 工具栏区域 */

// 选择器配置
export const SearchSelector: ISearchSelector = {
  Options: [
    { label: '记录编号', value: '1' },
    { label: '商品名称', value: '2' },
    { label: '销售单位', value: '3' }
  ],
  defaultValue: '1', 
  id: 8
};
// 按钮组
export const buttonGroup: IToolButton[] = [
  { type: 'create', text: '新增记录', isShow: true, onClick: () => {}, id: 9 },
  {
    type: 'import',
    text: '导入',
    isShow: true,
    onClick: () => {},
    id: 10
  },
  { type: 'export', text: '导出', isShow: true, onClick: () => {}, id: 11 }
];

/* 表格区域 */

// 表格列配置
// type columnType = {
//   title: string
//   dataIndex: string
//   key: string
// }

// export const FormColumns: ColumnProps<columnType>[] = [
export const FormColumns: any = [
  {
    title: '鸡舍id',
    dataIndex: 'chickenHouseId',
    key: 'chickenHouseId'
  },
  {
    title: '药品名称',
    dataIndex: 'drugName',
    key: 'drugName'
  },
  {
    title: '药品编号',
    dataIndex: 'drugNumber',
    key: 'drugNumber',
  },
  {
    title: '用药时间',
    dataIndex: 'druggingTime',
    key: 'druggingTime',
  },
  {
    title: '用药需求',
    dataIndex: 'personInChargeName',
    key: 'personInChargeName'
  },
  {
    title: '负责人',
    dataIndex: 'personInChargeName',
    key: 'personInChargeName'
  },
  {
    title: '负责人联系电话',
    dataIndex: 'personInChargePhone',
    key: 'personInChargePhone'
  },
];

//复选框的接口
export interface DataType {
  key: React.Key;
  id: string;
  name: string;
  age: number;
  address: string;
}
